****************
*** PANEL A ****
****************
clear all 
set more off
cd "/Users/yasenov/Dropbox/mariel_boatlift/jhr_version/jhr_figures"
global folder /Users/yasenov/Dropbox/mariel_boatlift/revision_version/revision_data/
set scheme s1color

use fig7a.dta, clear 

/* standardize all to 0 in 1979 */
rename te_miami te100
keep year te*
keep if year != .
reshape long te, i(year) j(city)
sort city year
by city: gen v = te[7]
replace te = te - v
drop v
reshape wide te, i(year) j(city)
rename te100 miami
/*			*/

replace te40 = -.5 if te40 < -.5
replace te27 = -.5 if te27 < -.5

#delimit ;
twoway
	(tsline te1, lcolor(gs12) lwidth(vthin)) (tsline te2, lcolor(gs12) lwidth(vthin))
	(tsline te3, lcolor(gs12) lwidth(vthin)) (tsline te4, lcolor(gs12) lwidth(vthin))
	(tsline te5, lcolor(gs12) lwidth(vthin)) (tsline te6, lcolor(gs12) lwidth(vthin))
	(tsline te7, lcolor(gs12) lwidth(vthin)) (tsline te8, lcolor(gs12) lwidth(vthin))
	(tsline te9, lcolor(gs12) lwidth(vthin)) (tsline te10, lcolor(gs12) lwidth(vthin))
	(tsline te11, lcolor(gs12) lwidth(vthin)) (tsline te12, lcolor(gs12) lwidth(vthin))
	(tsline te13, lcolor(gs12) lwidth(vthin)) (tsline te14, lcolor(gs12) lwidth(vthin))
	(tsline te15, lcolor(gs12) lwidth(vthin)) (tsline te16, lcolor(gs12) lwidth(vthin))
	(tsline te17, lcolor(gs12) lwidth(vthin)) (tsline te18, lcolor(gs12) lwidth(vthin))
	(tsline te19, lcolor(gs12) lwidth(vthin)) (tsline te20, lcolor(gs12) lwidth(vthin))
	(tsline te21, lcolor(gs12) lwidth(vthin)) (tsline te22, lcolor(gs12) lwidth(vthin))
	(tsline te23, lcolor(gs12) lwidth(vthin)) (tsline te24, lcolor(gs12) lwidth(vthin))
	(tsline te25, lcolor(gs12) lwidth(vthin)) (tsline te26, lcolor(gs12) lwidth(vthin)) 
	(tsline te27, lcolor(gs12) lwidth(vthin)) (tsline te28, lcolor(gs12) lwidth(vthin))
	(tsline te29, lcolor(gs12) lwidth(vthin)) (tsline te30, lcolor(gs12) lwidth(vthin))
	(tsline te31, lcolor(gs12) lwidth(vthin)) (tsline te32, lcolor(gs12) lwidth(vthin))
	(tsline te33, lcolor(gs12) lwidth(vthin)) (tsline te34, lcolor(gs12) lwidth(vthin))
	(tsline te35, lcolor(gs12) lwidth(vthin)) (tsline te36, lcolor(gs12) lwidth(vthin))
	(tsline te37, lcolor(gs12) lwidth(vthin)) (tsline te38, lcolor(gs12) lwidth(vthin))
	(tsline te39, lcolor(gs12) lwidth(vthin)) (tsline te40, lcolor(gs12) lwidth(vthin))
	(tsline te41, lcolor(gs12) lwidth(vthin))
	(tsline miami, lcolor(black) lwidth(medthick)),
	xline(1979, lpattern(dash) lcolor(black))
	yline(0, lcolor(black))
	legend(off)
	xtitle("")
	subtitle("Log Weekly Wages")
	xlabel(1973 "1973" 1975 "75" 1977 "77" 1979 `""79" "Pre""' 1981 `""81" "Post""' 1983 "83" 1985 "85" 1987 "87" 1989 "89" 1991 "91") 
	xscale(range(1973 1991)) plotregion(lwidth(none))
	ylabel(-.5(.2).5)
	text(.55 1990 "Panel A");
#delimit cr

graph copy one, replace

****************
*** PANEL B ****
****************
use fig7b.dta, clear 

/* standardize all to 0 in 1979 */
rename te_miami te100
keep year te*
keep if year != .
reshape long te, i(year) j(city)
sort city year
by city: gen v = te[7]
replace te = te - v
drop v
reshape wide te, i(year) j(city)
rename te100 miami
/*			*/

replace te28 = -.5 if te28 < -.5

#delimit ;
twoway
	(tsline te1, lcolor(gs12) lwidth(vthin)) (tsline te2, lcolor(gs12) lwidth(vthin))
	(tsline te3, lcolor(gs12) lwidth(vthin)) (tsline te4, lcolor(gs12) lwidth(vthin))
	(tsline te5, lcolor(gs12) lwidth(vthin)) (tsline te6, lcolor(gs12) lwidth(vthin))
	(tsline te7, lcolor(gs12) lwidth(vthin)) (tsline te8, lcolor(gs12) lwidth(vthin))
	(tsline te9, lcolor(gs12) lwidth(vthin)) (tsline te10, lcolor(gs12) lwidth(vthin))
	(tsline te11, lcolor(gs12) lwidth(vthin)) (tsline te12, lcolor(gs12) lwidth(vthin))
	(tsline te13, lcolor(gs12) lwidth(vthin)) (tsline te14, lcolor(gs12) lwidth(vthin))
	(tsline te15, lcolor(gs12) lwidth(vthin)) (tsline te16, lcolor(gs12) lwidth(vthin))
	(tsline te17, lcolor(gs12) lwidth(vthin)) (tsline te18, lcolor(gs12) lwidth(vthin))
	(tsline te19, lcolor(gs12) lwidth(vthin)) (tsline te20, lcolor(gs12) lwidth(vthin))
	(tsline te21, lcolor(gs12) lwidth(vthin)) (tsline te22, lcolor(gs12) lwidth(vthin))
	(tsline te23, lcolor(gs12) lwidth(vthin)) (tsline te24, lcolor(gs12) lwidth(vthin))
	(tsline te25, lcolor(gs12) lwidth(vthin)) (tsline te26, lcolor(gs12) lwidth(vthin)) 
	(tsline te27, lcolor(gs12) lwidth(vthin)) (tsline te28, lcolor(gs12) lwidth(vthin))
	(tsline te29, lcolor(gs12) lwidth(vthin)) (tsline te30, lcolor(gs12) lwidth(vthin))
	(tsline te31, lcolor(gs12) lwidth(vthin)) (tsline te32, lcolor(gs12) lwidth(vthin))
	(tsline te33, lcolor(gs12) lwidth(vthin)) (tsline te34, lcolor(gs12) lwidth(vthin))
	(tsline te35, lcolor(gs12) lwidth(vthin)) (tsline te36, lcolor(gs12) lwidth(vthin))
	(tsline te37, lcolor(gs12) lwidth(vthin)) (tsline te38, lcolor(gs12) lwidth(vthin))
	(tsline te39, lcolor(gs12) lwidth(vthin)) (tsline te40, lcolor(gs12) lwidth(vthin))
	(tsline te41, lcolor(gs12) lwidth(vthin)) (tsline te42, lcolor(gs12) lwidth(vthin))
	(tsline miami, lcolor(black) lwidth(medthick)),
	xline(1979, lpattern(dash) lcolor(black))
	yline(0, lcolor(black))
	legend(off)
	xtitle("")
	subtitle("Log Hourly Wages")
	xlabel(1973 "1973" 1975 "75" 1977 "77" 1979 `""79" "Pre""' 1981 `""81" "Post""' 1983 "83" 1985 "85" 1987 "87" 1989 "89" 1991 "91") 
	xscale(range(1973 1991))  plotregion(lwidth(none))
	ylabel(-.5(.2).5)
	text(.5 1990 "Panel B");
#delimit cr

graph copy two, replace

****************
*** PANEL C ****
****************
use fig7c.dta, clear 

/* standardize all to 0 in 1979 */
rename te_miami te100
keep year te*
keep if year != .
reshape long te, i(year) j(city)
sort city year
by city: gen v = te[7]
replace te = te - v
drop v
reshape wide te, i(year) j(city)
rename te100 miami
/*			*/

#delimit ;
twoway
	(tsline te1, lcolor(gs12) lwidth(vthin)) (tsline te2, lcolor(gs12) lwidth(vthin))
	(tsline te3, lcolor(gs12) lwidth(vthin)) (tsline te4, lcolor(gs12) lwidth(vthin))
	(tsline te5, lcolor(gs12) lwidth(vthin)) (tsline te6, lcolor(gs12) lwidth(vthin))
	(tsline te7, lcolor(gs12) lwidth(vthin)) (tsline te8, lcolor(gs12) lwidth(vthin))
	(tsline te9, lcolor(gs12) lwidth(vthin)) (tsline te10, lcolor(gs12) lwidth(vthin))
	(tsline te11, lcolor(gs12) lwidth(vthin)) (tsline te12, lcolor(gs12) lwidth(vthin))
	(tsline te13, lcolor(gs12) lwidth(vthin)) (tsline te14, lcolor(gs12) lwidth(vthin))
	(tsline te15, lcolor(gs12) lwidth(vthin)) (tsline te16, lcolor(gs12) lwidth(vthin))
	(tsline te17, lcolor(gs12) lwidth(vthin)) (tsline te18, lcolor(gs12) lwidth(vthin))
	(tsline te19, lcolor(gs12) lwidth(vthin)) (tsline te20, lcolor(gs12) lwidth(vthin))
	(tsline te21, lcolor(gs12) lwidth(vthin)) (tsline te22, lcolor(gs12) lwidth(vthin))
	(tsline te23, lcolor(gs12) lwidth(vthin)) (tsline te24, lcolor(gs12) lwidth(vthin))
	(tsline te25, lcolor(gs12) lwidth(vthin)) (tsline te26, lcolor(gs12) lwidth(vthin)) 
	(tsline te27, lcolor(gs12) lwidth(vthin)) (tsline te28, lcolor(gs12) lwidth(vthin))
	(tsline te29, lcolor(gs12) lwidth(vthin)) (tsline te30, lcolor(gs12) lwidth(vthin))
	(tsline te31, lcolor(gs12) lwidth(vthin)) (tsline te32, lcolor(gs12) lwidth(vthin))
	(tsline te33, lcolor(gs12) lwidth(vthin)) (tsline te34, lcolor(gs12) lwidth(vthin))
	(tsline te35, lcolor(gs12) lwidth(vthin)) (tsline te36, lcolor(gs12) lwidth(vthin))
	(tsline te37, lcolor(gs12) lwidth(vthin)) (tsline te38, lcolor(gs12) lwidth(vthin))
	(tsline te39, lcolor(gs12) lwidth(vthin)) (tsline te40, lcolor(gs12) lwidth(vthin))
	(tsline te41, lcolor(gs12) lwidth(vthin)) (tsline te42, lcolor(gs12) lwidth(vthin))
	(tsline miami, lcolor(black) lwidth(medthick)),
	xline(1979, lpattern(dash) lcolor(black))
	yline(0, lcolor(black))
	legend(off)
	xtitle("")
	subtitle("15th Percentile Log Weekly Wages")
	xlabel(1973 "1973" 1975 "75" 1977 "77" 1979 `""79" "Pre""' 1981 `""81" "Post""' 1983 "83" 1985 "85" 1987 "87" 1989 "89" 1991 "91") 
	xscale(range(1973 1991))  plotregion(lwidth(none))
	ylabel(-.5(.2).5)
	text(.5 1990 "Panel C");
#delimit cr

graph copy three, replace

****************
*** PANEL D ****
****************
use fig7d.dta, clear 

/* standardize all to 0 in 1979 */
rename te_miami te100
keep year te*
keep if year != .
reshape long te, i(year) j(city)
sort city year
by city: gen v = te[7]
replace te = te - v
drop v
reshape wide te, i(year) j(city)
rename te100 miami
/*			*/

replace te39 = .2 if te39 > .2

#delimit ;
twoway
	(tsline te1, lcolor(gs12) lwidth(vthin)) (tsline te2, lcolor(gs12) lwidth(vthin))
	(tsline te3, lcolor(gs12) lwidth(vthin)) (tsline te4, lcolor(gs12) lwidth(vthin))
	(tsline te5, lcolor(gs12) lwidth(vthin)) (tsline te6, lcolor(gs12) lwidth(vthin))
	(tsline te7, lcolor(gs12) lwidth(vthin)) (tsline te8, lcolor(gs12) lwidth(vthin))
	(tsline te9, lcolor(gs12) lwidth(vthin)) (tsline te10, lcolor(gs12) lwidth(vthin))
	(tsline te11, lcolor(gs12) lwidth(vthin)) (tsline te12, lcolor(gs12) lwidth(vthin))
	(tsline te13, lcolor(gs12) lwidth(vthin)) (tsline te14, lcolor(gs12) lwidth(vthin))
	(tsline te15, lcolor(gs12) lwidth(vthin)) (tsline te16, lcolor(gs12) lwidth(vthin))
	(tsline te17, lcolor(gs12) lwidth(vthin)) (tsline te18, lcolor(gs12) lwidth(vthin))
	(tsline te19, lcolor(gs12) lwidth(vthin)) (tsline te20, lcolor(gs12) lwidth(vthin))
	(tsline te21, lcolor(gs12) lwidth(vthin)) (tsline te22, lcolor(gs12) lwidth(vthin))
	(tsline te23, lcolor(gs12) lwidth(vthin)) (tsline te24, lcolor(gs12) lwidth(vthin))
	(tsline te25, lcolor(gs12) lwidth(vthin)) (tsline te26, lcolor(gs12) lwidth(vthin)) 
	(tsline te27, lcolor(gs12) lwidth(vthin)) (tsline te28, lcolor(gs12) lwidth(vthin))
	(tsline te29, lcolor(gs12) lwidth(vthin)) (tsline te30, lcolor(gs12) lwidth(vthin))
	(tsline te31, lcolor(gs12) lwidth(vthin)) (tsline te32, lcolor(gs12) lwidth(vthin))
	(tsline te33, lcolor(gs12) lwidth(vthin)) (tsline te34, lcolor(gs12) lwidth(vthin))
	(tsline te35, lcolor(gs12) lwidth(vthin)) (tsline te36, lcolor(gs12) lwidth(vthin))
	(tsline te37, lcolor(gs12) lwidth(vthin)) (tsline te38, lcolor(gs12) lwidth(vthin))
	(tsline te39, lcolor(gs12) lwidth(vthin)) (tsline te40, lcolor(gs12) lwidth(vthin))
	(tsline te41, lcolor(gs12) lwidth(vthin)) (tsline te42, lcolor(gs12) lwidth(vthin))
	(tsline te43, lcolor(gs12) lwidth(vthin))
	(tsline miami, lcolor(black) lwidth(medthick)),
	xline(1979, lpattern(dash) lcolor(black))
	yline(0, lcolor(black))
	legend(off)
	xtitle("")
	subtitle("Unemployment")
	xlabel(1973 "1973" 1975 "75" 1977 "77" 1979 `""79" "Pre""' 1981 `""81" "Post""' 1983 "83" 1985 "85" 1987 "87" 1989 "89" 1991 "91") 
	xscale(range(1973 1991))  plotregion(lwidth(none))
	text(.3 1990 "Panel D");
#delimit cr

graph copy four, replace

graph combine one two three four, imargin(small)
graph export "jhr_fig7.pdf", replace	
